package day17MySQLWork.service;

import day17MySQLWork.dao.ZhangWuDao;
import day17MySQLWork.domain.ZhangWuDomain;

import java.util.List;

public class ZhangWuService {

    //service都依赖dao
    private ZhangWuDao zhangWuDao = new ZhangWuDao();

    /**
     * 查询所有
     */
    public List<ZhangWuDomain> selectAll() {
        return zhangWuDao.selectAll();
    }

    /**
     * 按条件查询账务方法
     * @param start
     * @param end
     * @return
     */
    public List<ZhangWuDomain> select(String start, String end) {
        return zhangWuDao.select(start, end);
    }

    /**
     * 添加账务
     * @param zw
     */
    public void addZhangWu(ZhangWuDomain zw) {
        zhangWuDao.addZhangWu(zw);
    }
}
